home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / coreaids.arc / MOVE_BYT.ASM < prev    next >
Assembly Source File  |  1987-06-25  |  912b  |  38 lines

  1. ;    DESC:    Moves a source buffer to a dest. buffer              V1.00
  2. ;    IN:    *{SEG_VAL1} segment and
  3. ;        *{OFFSET1} offset of input buffer
  4. ;        *{SEG_VAL2} segment and
  5. ;        *{OFFSET2} offset of output buffer
  6. ;        *{NUM_CHARS} # of chars to move
  7. ;    SAMPLE:    Callm    MOVE_BYT,<SEG_VAL1,OFFSET1,SEG_VAL2,OFFSET2,
  8. ;                         NUM_CHARS>,
  9. ;    ##################################################################
  10.  
  11.     Extrn    PUSHALL:Near
  12.     Extrn    POPALL:Near
  13.  
  14. MOV_BYTC    Segment
  15.     Assume    CS:MOV_BYTC
  16.     Public    MOVE_BYT
  17.  
  18.                         ;notice.
  19.     DB    'MOVE_BYT - V1.00, Copyright 1987, CoreTechs   ',0DH,0AH
  20.  
  21. MOVE_BYT    Proc    Near
  22.     Call    PUSHALL                ;save registers.
  23.  
  24.     Pop    CX                ;get number of characters.
  25.     Pop    DI                ;destination offset.
  26.     Pop    ES                ;destination segment.
  27.     Pop    SI                ;source offset.
  28.     Pop    DS                ;source segment.
  29.  
  30.     Rep    MOVSB                ;perform move operation.
  31.  
  32.     Call    POPALL
  33.     Ret
  34.  
  35. MOVE_BYT    Endp
  36. MOV_BYTC    Ends
  37.     End
  38.